Integrand size = 40, antiderivative size = 152 \[ \int \frac {\left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {(7 B-4 C) \text {arctanh}(\sin (c+d x))}{2 a^2 d}-\frac {2 (8 B-5 C) \tan (c+d x)}{3 a^2 d}+\frac {(7 B-4 C) \sec (c+d x) \tan (c+d x)}{2 a^2 d}-\frac {(8 B-5 C) \sec (c+d x) \tan (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {(B-C) \sec (c+d x) \tan (c+d x)}{3 d (a+a \cos (c+d x))^2} \]
1/2*(7*B-4*C)*arctanh(sin(d*x+c))/a^2/d-2/3*(8*B-5*C)*tan(d*x+c)/a^2/d+1/2 *(7*B-4*C)*sec(d*x+c)*tan(d*x+c)/a^2/d-1/3*(8*B-5*C)*sec(d*x+c)*tan(d*x+c) /a^2/d/(1+cos(d*x+c))-1/3*(B-C)*sec(d*x+c)*tan(d*x+c)/d/(a+a*cos(d*x+c))^2
Leaf count is larger than twice the leaf count of optimal. \(496\) vs. \(2(152)=304\).
Time = 3.99 (sec) , antiderivative size = 496, normalized size of antiderivative = 3.26 \[ \int \frac {\left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=-\frac {96 (7 B-4 C) \cos ^4\left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \sec (c) \sec ^2(c+d x) \left (-14 (B-C) \sin \left (\frac {d x}{2}\right )+(97 B-64 C) \sin \left (\frac {3 d x}{2}\right )-126 B \sin \left (c-\frac {d x}{2}\right )+84 C \sin \left (c-\frac {d x}{2}\right )+42 B \sin \left (c+\frac {d x}{2}\right )-42 C \sin \left (c+\frac {d x}{2}\right )-98 B \sin \left (2 c+\frac {d x}{2}\right )+56 C \sin \left (2 c+\frac {d x}{2}\right )-3 B \sin \left (c+\frac {3 d x}{2}\right )+6 C \sin \left (c+\frac {3 d x}{2}\right )+37 B \sin \left (2 c+\frac {3 d x}{2}\right )-34 C \sin \left (2 c+\frac {3 d x}{2}\right )-63 B \sin \left (3 c+\frac {3 d x}{2}\right )+36 C \sin \left (3 c+\frac {3 d x}{2}\right )+75 B \sin \left (c+\frac {5 d x}{2}\right )-48 C \sin \left (c+\frac {5 d x}{2}\right )+15 B \sin \left (2 c+\frac {5 d x}{2}\right )-6 C \sin \left (2 c+\frac {5 d x}{2}\right )+39 B \sin \left (3 c+\frac {5 d x}{2}\right )-30 C \sin \left (3 c+\frac {5 d x}{2}\right )-21 B \sin \left (4 c+\frac {5 d x}{2}\right )+12 C \sin \left (4 c+\frac {5 d x}{2}\right )+32 B \sin \left (2 c+\frac {7 d x}{2}\right )-20 C \sin \left (2 c+\frac {7 d x}{2}\right )+12 B \sin \left (3 c+\frac {7 d x}{2}\right )-6 C \sin \left (3 c+\frac {7 d x}{2}\right )+20 B \sin \left (4 c+\frac {7 d x}{2}\right )-14 C \sin \left (4 c+\frac {7 d x}{2}\right )\right )}{48 a^2 d (1+\cos (c+d x))^2} \]
-1/48*(96*(7*B - 4*C)*Cos[(c + d*x)/2]^4*(Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) + Cos[(c + d*x)/2]*Se c[c/2]*Sec[c]*Sec[c + d*x]^2*(-14*(B - C)*Sin[(d*x)/2] + (97*B - 64*C)*Sin [(3*d*x)/2] - 126*B*Sin[c - (d*x)/2] + 84*C*Sin[c - (d*x)/2] + 42*B*Sin[c + (d*x)/2] - 42*C*Sin[c + (d*x)/2] - 98*B*Sin[2*c + (d*x)/2] + 56*C*Sin[2* c + (d*x)/2] - 3*B*Sin[c + (3*d*x)/2] + 6*C*Sin[c + (3*d*x)/2] + 37*B*Sin[ 2*c + (3*d*x)/2] - 34*C*Sin[2*c + (3*d*x)/2] - 63*B*Sin[3*c + (3*d*x)/2] + 36*C*Sin[3*c + (3*d*x)/2] + 75*B*Sin[c + (5*d*x)/2] - 48*C*Sin[c + (5*d*x )/2] + 15*B*Sin[2*c + (5*d*x)/2] - 6*C*Sin[2*c + (5*d*x)/2] + 39*B*Sin[3*c + (5*d*x)/2] - 30*C*Sin[3*c + (5*d*x)/2] - 21*B*Sin[4*c + (5*d*x)/2] + 12 *C*Sin[4*c + (5*d*x)/2] + 32*B*Sin[2*c + (7*d*x)/2] - 20*C*Sin[2*c + (7*d* x)/2] + 12*B*Sin[3*c + (7*d*x)/2] - 6*C*Sin[3*c + (7*d*x)/2] + 20*B*Sin[4* c + (7*d*x)/2] - 14*C*Sin[4*c + (7*d*x)/2]))/(a^2*d*(1 + Cos[c + d*x])^2)
Time = 1.10 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.99, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {3042, 3508, 3042, 3457, 3042, 3457, 3042, 3227, 3042, 4254, 24, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^4(c+d x) \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a \cos (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 3508 |
\(\displaystyle \int \frac {\sec ^3(c+d x) (B+C \cos (c+d x))}{(a \cos (c+d x)+a)^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {B+C \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\int \frac {(a (5 B-2 C)-3 a (B-C) \cos (c+d x)) \sec ^3(c+d x)}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (5 B-2 C)-3 a (B-C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\int \left (3 a^2 (7 B-4 C)-2 a^2 (8 B-5 C) \cos (c+d x)\right ) \sec ^3(c+d x)dx}{a^2}-\frac {(8 B-5 C) \tan (c+d x) \sec (c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {3 a^2 (7 B-4 C)-2 a^2 (8 B-5 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3}dx}{a^2}-\frac {(8 B-5 C) \tan (c+d x) \sec (c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {\frac {3 a^2 (7 B-4 C) \int \sec ^3(c+d x)dx-2 a^2 (8 B-5 C) \int \sec ^2(c+d x)dx}{a^2}-\frac {(8 B-5 C) \tan (c+d x) \sec (c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 a^2 (7 B-4 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-2 a^2 (8 B-5 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2}-\frac {(8 B-5 C) \tan (c+d x) \sec (c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {\frac {2 a^2 (8 B-5 C) \int 1d(-\tan (c+d x))}{d}+3 a^2 (7 B-4 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx}{a^2}-\frac {(8 B-5 C) \tan (c+d x) \sec (c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {3 a^2 (7 B-4 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {2 a^2 (8 B-5 C) \tan (c+d x)}{d}}{a^2}-\frac {(8 B-5 C) \tan (c+d x) \sec (c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {\frac {3 a^2 (7 B-4 C) \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {2 a^2 (8 B-5 C) \tan (c+d x)}{d}}{a^2}-\frac {(8 B-5 C) \tan (c+d x) \sec (c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 a^2 (7 B-4 C) \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {2 a^2 (8 B-5 C) \tan (c+d x)}{d}}{a^2}-\frac {(8 B-5 C) \tan (c+d x) \sec (c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {3 a^2 (7 B-4 C) \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {2 a^2 (8 B-5 C) \tan (c+d x)}{d}}{a^2}-\frac {(8 B-5 C) \tan (c+d x) \sec (c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {(B-C) \tan (c+d x) \sec (c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
-1/3*((B - C)*Sec[c + d*x]*Tan[c + d*x])/(d*(a + a*Cos[c + d*x])^2) + (-(( (8*B - 5*C)*Sec[c + d*x]*Tan[c + d*x])/(d*(1 + Cos[c + d*x]))) + ((-2*a^2* (8*B - 5*C)*Tan[c + d*x])/d + 3*a^2*(7*B - 4*C)*(ArcTanh[Sin[c + d*x]]/(2* d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d)))/a^2)/(3*a^2)
3.3.68.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_ .) + (f_.)*(x_)]^2), x_Symbol] :> Simp[1/b^2 Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 2.06 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.04
method | result | size |
parallelrisch | \(\frac {-42 \left (1+\cos \left (2 d x +2 c \right )\right ) \left (B -\frac {4 C}{7}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+42 \left (1+\cos \left (2 d x +2 c \right )\right ) \left (B -\frac {4 C}{7}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-60 \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (\frac {43 B}{60}-\frac {7 C}{15}\right ) \cos \left (2 d x +2 c \right )+\left (\frac {4 B}{15}-\frac {C}{6}\right ) \cos \left (3 d x +3 c \right )+\left (B -\frac {7 C}{10}\right ) \cos \left (d x +c \right )+\frac {37 B}{60}-\frac {7 C}{15}\right )}{12 d \,a^{2} \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(158\) |
derivativedivides | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{3}+\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}-7 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {-5 B +2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (7 B -4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {B}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\left (-7 B +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {-5 B +2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {B}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}}{2 d \,a^{2}}\) | \(177\) |
default | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{3}+\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}-7 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {-5 B +2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (7 B -4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {B}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\left (-7 B +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {-5 B +2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {B}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}}{2 d \,a^{2}}\) | \(177\) |
norman | \(\frac {-\frac {\left (B -C \right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}-\frac {\left (10 B -7 C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}+\frac {\left (13 B -9 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}+\frac {2 \left (13 B -7 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {\left (16 B -7 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}+\frac {\left (53 B -29 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}-\frac {\left (91 B -55 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} a}-\frac {\left (7 B -4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a^{2} d}+\frac {\left (7 B -4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a^{2} d}\) | \(269\) |
risch | \(-\frac {i \left (21 B \,{\mathrm e}^{6 i \left (d x +c \right )}-12 C \,{\mathrm e}^{6 i \left (d x +c \right )}+63 B \,{\mathrm e}^{5 i \left (d x +c \right )}-36 C \,{\mathrm e}^{5 i \left (d x +c \right )}+98 B \,{\mathrm e}^{4 i \left (d x +c \right )}-56 C \,{\mathrm e}^{4 i \left (d x +c \right )}+126 B \,{\mathrm e}^{3 i \left (d x +c \right )}-84 C \,{\mathrm e}^{3 i \left (d x +c \right )}+97 B \,{\mathrm e}^{2 i \left (d x +c \right )}-64 C \,{\mathrm e}^{2 i \left (d x +c \right )}+75 B \,{\mathrm e}^{i \left (d x +c \right )}-48 C \,{\mathrm e}^{i \left (d x +c \right )}+32 B -20 C \right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {7 B \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 a^{2} d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{a^{2} d}+\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{2 a^{2} d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{a^{2} d}\) | \(276\) |
1/12*(-42*(1+cos(2*d*x+2*c))*(B-4/7*C)*ln(tan(1/2*d*x+1/2*c)-1)+42*(1+cos( 2*d*x+2*c))*(B-4/7*C)*ln(tan(1/2*d*x+1/2*c)+1)-60*sec(1/2*d*x+1/2*c)^2*tan (1/2*d*x+1/2*c)*((43/60*B-7/15*C)*cos(2*d*x+2*c)+(4/15*B-1/6*C)*cos(3*d*x+ 3*c)+(B-7/10*C)*cos(d*x+c)+37/60*B-7/15*C))/d/a^2/(1+cos(2*d*x+2*c))
Time = 0.27 (sec) , antiderivative size = 228, normalized size of antiderivative = 1.50 \[ \int \frac {\left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {3 \, {\left ({\left (7 \, B - 4 \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (7 \, B - 4 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (7 \, B - 4 \, C\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (7 \, B - 4 \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (7 \, B - 4 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (7 \, B - 4 \, C\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (4 \, {\left (8 \, B - 5 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (43 \, B - 28 \, C\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left (B - C\right )} \cos \left (d x + c\right ) - 3 \, B\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} + 2 \, a^{2} d \cos \left (d x + c\right )^{3} + a^{2} d \cos \left (d x + c\right )^{2}\right )}} \]
integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^4/(a+a*cos(d*x+c))^2,x, algorithm="fricas")
1/12*(3*((7*B - 4*C)*cos(d*x + c)^4 + 2*(7*B - 4*C)*cos(d*x + c)^3 + (7*B - 4*C)*cos(d*x + c)^2)*log(sin(d*x + c) + 1) - 3*((7*B - 4*C)*cos(d*x + c) ^4 + 2*(7*B - 4*C)*cos(d*x + c)^3 + (7*B - 4*C)*cos(d*x + c)^2)*log(-sin(d *x + c) + 1) - 2*(4*(8*B - 5*C)*cos(d*x + c)^3 + (43*B - 28*C)*cos(d*x + c )^2 + 6*(B - C)*cos(d*x + c) - 3*B)*sin(d*x + c))/(a^2*d*cos(d*x + c)^4 + 2*a^2*d*cos(d*x + c)^3 + a^2*d*cos(d*x + c)^2)
Timed out. \[ \int \frac {\left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\text {Timed out} \]
Leaf count of result is larger than twice the leaf count of optimal. 336 vs. \(2 (142) = 284\).
Time = 0.22 (sec) , antiderivative size = 336, normalized size of antiderivative = 2.21 \[ \int \frac {\left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=-\frac {B {\left (\frac {6 \, {\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {5 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{2} - \frac {2 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {21 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {21 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}\right )} - C {\left (\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} - \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{6 \, d} \]
integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^4/(a+a*cos(d*x+c))^2,x, algorithm="maxima")
-1/6*(B*(6*(3*sin(d*x + c)/(cos(d*x + c) + 1) - 5*sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/(a^2 - 2*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a^2*sin(d* x + c)^4/(cos(d*x + c) + 1)^4) + (21*sin(d*x + c)/(cos(d*x + c) + 1) + sin (d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 21*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 21*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2) - C*((15* sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 12*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 12*log(sin(d*x + c)/( cos(d*x + c) + 1) - 1)/a^2 + 12*sin(d*x + c)/((a^2 - a^2*sin(d*x + c)^2/(c os(d*x + c) + 1)^2)*(cos(d*x + c) + 1))))/d
Time = 0.36 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.30 \[ \int \frac {\left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {\frac {3 \, {\left (7 \, B - 4 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {3 \, {\left (7 \, B - 4 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac {6 \, {\left (5 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} a^{2}} - \frac {B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 21 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
1/6*(3*(7*B - 4*C)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 3*(7*B - 4*C)* log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^2 + 6*(5*B*tan(1/2*d*x + 1/2*c)^3 - 2 *C*tan(1/2*d*x + 1/2*c)^3 - 3*B*tan(1/2*d*x + 1/2*c) + 2*C*tan(1/2*d*x + 1 /2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^2*a^2) - (B*a^4*tan(1/2*d*x + 1/2*c)^ 3 - C*a^4*tan(1/2*d*x + 1/2*c)^3 + 21*B*a^4*tan(1/2*d*x + 1/2*c) - 15*C*a^ 4*tan(1/2*d*x + 1/2*c))/a^6)/d
Time = 1.28 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.09 \[ \int \frac {\left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^4(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (5\,B-2\,C\right )-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (3\,B-2\,C\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (B-C\right )}{2\,a^2}+\frac {4\,B-2\,C}{2\,a^2}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (B-C\right )}{6\,a^2\,d}+\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (7\,B-4\,C\right )}{a^2\,d} \]
(tan(c/2 + (d*x)/2)^3*(5*B - 2*C) - tan(c/2 + (d*x)/2)*(3*B - 2*C))/(d*(a^ 2*tan(c/2 + (d*x)/2)^4 - 2*a^2*tan(c/2 + (d*x)/2)^2 + a^2)) - (tan(c/2 + ( d*x)/2)*((3*(B - C))/(2*a^2) + (4*B - 2*C)/(2*a^2)))/d - (tan(c/2 + (d*x)/ 2)^3*(B - C))/(6*a^2*d) + (atanh(tan(c/2 + (d*x)/2))*(7*B - 4*C))/(a^2*d)